class GMMyPetsModel {
  int? code;
  String? message;
  GMMyPetsData? data;

  GMMyPetsModel({this.code, this.message, this.data});

  GMMyPetsModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    message = json['message'];
    data = json['data'] != null ? GMMyPetsData.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['code'] = code;
    data['message'] = message;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    return data;
  }
}

class GMMyPetsData {
  List<GMPetList>? petList;

  GMMyPetsData({this.petList});

  GMMyPetsData.fromJson(Map<String, dynamic> json) {
    if (json['petList'] != null) {
      petList = <GMPetList>[];
      json['petList'].forEach((v) {
        petList!.add(GMPetList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (petList != null) {
      data['petList'] = petList!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class GMPetList {
  String? id;
  int? coverType;
  String? coverUrl;
  int? categoryId;
  String? categoryName;
  String? nickname;
  int? gender;
  int? kcStatus;
  String? birthday;
  String? accompanyDays;
  int? praiseNum;

  GMPetList(
      {this.id,
      this.coverType,
      this.coverUrl,
      this.categoryId,
      this.categoryName,
      this.nickname,
      this.gender,
      this.kcStatus,
      this.birthday,
      this.accompanyDays,
      this.praiseNum,});

  GMPetList.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    coverType = json['coverType'];
    coverUrl = json['coverUrl'];
    categoryId = json['categoryId'];
    categoryName = json['categoryName'];
    nickname = json['nickname'];
    gender = json['gender'];
    kcStatus = json['kcStatus'];
    birthday = json['birthday'];
    accompanyDays = json['accompanyDays'];
    praiseNum = json['praiseNum'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['coverType'] = coverType;
    data['coverUrl'] = coverUrl;
    data['categoryId'] =categoryId;
    data['categoryName'] = categoryName;
    data['nickname'] = nickname;
    data['gender'] = gender;
    data['kcStatus'] = kcStatus;
    data['birthday'] = birthday;
    data['accompanyDays'] = accompanyDays;
    data['praiseNum'] = praiseNum;
    return data;
  }
}
